<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        <SCRIPT Language="JavaScript">
            var xmlDoc=new ActiveXObject("microsoft.xmlDom");

            xmlDoc.async=false;

            xmlDoc.load("marcas.xml");
           
            var raiz=xmlDoc.documentElement;
              alert(raiz);
            indice=0;
            nommarca="";

            function mostrar(indice) {
                if (indice!=0) {
                    indice--;
                    raiz=xmlDoc.documentElement;
                    var nodo=raiz.childNodes.item(indice);
                    nommarca=nodo.childNodes.item(1).text;
                    document.body.style.backgroundImage='url(images/fdo'+nodo.childNodes.item(0).text+'.gif)';
                    document.imag.src='images/logo'+nodo.childNodes.item(0).text+'.gif';
                }
            }

            function mostrarload(indice) {
                  
                var nodo=raiz.childNodes.item(indice);
              
                document.body.style.backgroundImage='url(imagenes/fdo'+nodo.childNodes.item(0).text+'.gif)';
                document.imag.src='imagenes/logo'+nodo.childNodes.item(0).text+'.gif';
                nommarca=nodo.childNodes.item(1).text;
                for (i=0;i<raiz.childNodes.length;i++) {
                  
                    nodo=raiz.childNodes.item(i);
                    var oOption = document.createElement("option");
                    document.all("nmarca").add(oOption);
                    oOption.innerText = nodo.childNodes.item(1).text;
                    oOption.value = i+1;
                }
            }
        </SCRIPT>
        <title></title>
    </head>
    <body onLoad="mostrarload(1)" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" text="#FFFFFF" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF">
        <table border="1" cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td align="left"><img name="imag"></td>
                <td align="right"><b>Marca:</b><select id="nmarca" name="menu" onChange="mostrar(this.value)"></select></td>
            </tr>
        </table>
    </body>
</html>
